﻿@model ZoomLa.Model.M_Exam_Class
@{
    string action = (Request.QueryString["action"] ?? "").ToLower();
}
@section head{
    <title>编辑科目</title>
}
@section content{
    <div id="BreadDiv" class="container-fluid mysite">
        <div class="row">
            <ol id="BreadNav" class="breadcrumb navbar-fixed-top">
                <li><a href='@(CustomerPageAction.customPath2)I/Main.aspx'>工作台</a></li>
                <li><a href='Papers_System_Manage'>教育模块</a></li>
                <li><a href='QuestionManage'>考试管理</a></li>
                <li><a href='Question_Class_Manage'>分类管理</a></li>
                <li>编辑分类</li>
            </ol>
        </div>
    </div>
    <form method="post" action="@MVCHelper.GetAction("Question_Class_Add",Request)">
        <table class="table table-striped table-bordered table-hover">
            <tr>
                <td class="td_m text-right">科目名称:</td>
                <td class="bqright">
                    @Html.TextBoxFor(m => m.C_ClassName, new { @class = "form-control text_md" })
                </td>
            </tr>
            <tr class="tdbg">
                <td class="tdbgleft" align="right">所属科目:</td>
                <td>
                    @if (Model.C_id < 1)
                    {
                        @Html.DropDownListFor(m => m.C_Classid, ViewBag.clist as SelectList, new { @class = "form-control text_md" })
                    }
                    else
                    {
                        @Html.HiddenFor(m => m.C_Classid)
                        <input type="text" class="form-control text_md" value="@(string.IsNullOrEmpty(Model.C_ClassName) ? "无所属分类" : Model.C_ClassName)" readonly="readonly" />
                    }
                </td>
            </tr>
            <tr class="tdbg">
                <td class="tdbgleft" align="right">科目类型:</td>
                <td>
                    @MVCHelper.H_Radios("C_ClassType", "答题类型,视频操作类型".Split(','), "1,2".Split(','), Model.C_ClassType==0 ? "1" : Model.C_ClassType.ToString())
                </td>
            </tr>
            <tr>
                <td class="tdbgleft" align="right">排序:</td>
                <td class="bqright">
                    @Html.TextBoxFor(m => m.C_OrderBy, new { @class = "form-control text_md" })
                </td>
            </tr>
            <tr class="tdbgbottom">
                <td></td>
                <td>
                    <button type="submit" class="btn btn-primary">保存</button>
                    &nbsp;
                    <a href="Question_Class_Manage" class="btn btn-primary">返　回</a>
                </td>
            </tr>
        </table>
    </form>
}
@section script{
    <script>
        $(function () {
            validate.zl_init($("form"), {
                rules: {
                    C_ClassName: { required: true }
                },
                messages: {
                    C_ClassName: { required: "科目名称不能为空" }
                },
            }, { placement: 'right', style: 'green' });
        })
    </script>
}